<?php
include_once($_SERVER["DOCUMENT_ROOT"].'/home/public/header.php');
include_once($_SERVER["DOCUMENT_ROOT"].'/public/func.php');
$config=include_once($_SERVER["DOCUMENT_ROOT"].'/public/config.php');
$w=sel($config,'`guanli`','where `tu`="" order by addtime desc limit 0,2');
$re=sel($config,'`guanli`','where `tu`!="" order by addtime desc limit 0,2');
$rew=sel($config,'`guanli`','order by addtime desc limit 0,5');

$r=sel($config,'`liuyan`','order by addtime desc limit 0,3');
$ew=sel($config,'`lanmu`','order by addtime desc limit 0,5');
?>

<div class="banner">
  <section class="box">
    <ul class="texts">
      <p>打了死结的青春，捆死一颗苍白绝望的灵魂。</p>
      <p>为自己掘一个坟墓来葬心，红尘一梦，不再追寻。</p>
      <p>加了锁的青春，不会再因谁而推开心门。</p>
    </ul>
    <div class="avatar"><a href="about.php"><span>即步非烟</span></a> </div>
  </section>
</div>

<article>
  <h2 class="title_tj">
    <p>图文<span>专区</span></p>
  </h2>
  <div class="bloglist left">
  <?php foreach ($re as $v) {
    if ($v['tu']!="") {
   echo '<h2>'.$v['title'].'</h2>
        <figure><img src="'.$v['tu'].'"></figure>
        <ul>
          <p>'.mb_substr(strip_tags($v['content']),0,100,'utf-8').'...</p>

          <a title="/" href="now.php?id='.$v['id'].'" target="_blank" class="readmore">文章详情>></a>
        </ul>
        <p class="dateview"><span>时间：'.$v['addtime'].'</span><span>作者：'.$v['author'].'</span><span>标签：'.$v['biao'].'</span></p>';
  } }?>

    

<h2 class="title_tj">
    <p>纯文<span>专区</span></p>
  </h2>
  

 <?php foreach ($w as $v) {
 echo '<h2>'.$v['title'].'</h2>
       <ul>
          <p>'.mb_substr($v['content'],0,30,'utf-8').'......</p>
          <a title="/" href="now.php?id='.$v['id'].'" target="_blank" class="readmore">文章详情>></a>
        </ul>
        <p class="dateview"><span>时间：'.$v['addtime'].'</span><span>作者：'.$v['author'].'</span><span>标签：'.$v['biao'].'</span></p>';
  }?>





<h2 class="title_tj">
    <p>最新<span>留言</span></p>
  </h2>
  

<?php foreach ($r as $v) {
    echo '
        <ul>
          <p>'.mb_substr($v['content'],0,20,'utf-8').'</p>
         </ul>
        <p class="dateview"><span>时间：'.$v['addtime'].'</span><span>作者：'.$v['author'].'</span></p>';
  } ?>


</div>

  <aside class="right">
    <div class="weather"><iframe width="250" scrolling="no" height="60" frameborder="0" allowtransparency="true" src="http://i.tianqi.com/index.php?c=code&id=12&icon=1&num=1"></iframe></div>
    <div class="news">
    <h3>
      <p>栏目</p>
    </h3>
    <ul class="rank">

     
<?php
foreach ($ew as $v) {
echo '<li><a href="shar.php?lan='.$v['lan'].'" target="_blank">'.$v['lan'].'</a></li>';
}
?>
      
    </ul>
    
    <h3 class="links">
      <p>友情<span>衔接</span></p>
    </h3>
    <ul class="website">
      <li><a href="/">个人博客</a></li>
      <li><a href="/">3DST技术网</a></li>
      <li><a href="/">谢泽文个人博客</a></li>
      <li><a href="http://www.baidu.com">百度</a></li>
    </ul> 
    </div>  
    <!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
    <a class="bds_tsina"></a>
    <a class="bds_qzone"></a>
    <a class="bds_tqq"></a>
    <a class="bds_renren"></a>
    <span class="bds_more"></span>
    <a class="shareCount"></a>
    </div>
    <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=6574585" ></script>
    <script type="text/javascript" id="bdshell_js"></script> 
    <script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script> 
    <!-- Baidu Button END -->   
    <a href="/" class="weixin"> </a></aside>
</article>
<?php
include_once($_SERVER["DOCUMENT_ROOT"].'/home/public/footer.php');
?>